(function () {
  function setRem() {
    let clientWidth = document.documentElement.clientWidth;
    // console.log(clientWidth);
    let root = document.getElementsByTagName("html")[0];
    if (clientWidth > 1440) {
      root.style.fontSize = "192px";
    } else {
      root.style.fontSize = clientWidth / (1240 / 192) + "px";
    }
  }
  setRem();
  window.onresize = function () {
    setRem();
  };
})();
